package com.baox.agridata.synchronous.dao;


import com.baomidou.dynamic.datasource.annotation.DS;
import com.baox.agridata.synchronous.entity.TCCPAEntity;
import com.baox.agridata.synchronous.entity.TCCPBEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface TCCPAMapper {


    /**
     * 通过主键查询产品A是否存在
     *
     * @param mid
     * @return
     */
    @DS("sichuanc")
    TCCPAEntity selectTCCPAById(@Param("mid") String mid);


    /**
     * 插入产品A证
     *
     * @param tccpaEntity
     * @return
     */
    @DS("sichuanz")
    Integer insertIntoTCCPA(TCCPAEntity tccpaEntity);


    /**
     * 更新产品A证数据
     *
     * @param tccpaEntity
     * @return
     */
    @DS("sichuanz")
    Integer updateTCCPAById(TCCPAEntity tccpaEntity);


    /**
     * 成都发送到四川的产品A证数据，在外省落地后的数据，将状态返回给成都
     *
     * @param createTime
     * @return
     */
    @DS("sichuanc")
    List<TCCPAEntity> selectChengDuProductALandingBack(@Param("createTime") String createTime);

}
